<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
 <link rel="stylesheet" href="statics/css/jqueryMobile.css?version=12345678"> 
<!-- <link rel="stylesheet" href="jquery-mobile-flat-ui-theme-master/demo/css/jquery.mobile.flatui.css"> -->
<link rel="stylesheet" href="statics/css/mobiscroll.css">
<script src="statics/js/jquery-1.12.4.js"></script>
<script src="statics/js/jquery.form.js"></script>
<script src="statics/js/jqueryMobile.js"></script>
<script src="statics/js/mobiscroll.js"></script>	
<script src="statics/js/area.js"></script>
<script src="statics/js/msgenter.js?version=1.0.7"></script>
  <script type="text/javascript" src="statics/js/auth.js"></script>    
<link rel="stylesheet" type="text/css" href="statics/css/test.css"> 
<style type="text/css">
body, input, select, textarea, button, .ui-btn {
    font-size: 14px;
    line-height: 1.3;
    font-family: sans-serif;
}
.ui-btn, label.ui-btn {
    font-weight: 300;
    border-width: 1px;
    border-style: solid;
}
.ui-mobile label, div.ui-controlgroup-label {
    font-weight: 800;
    font-size: 16px;
    color: #737373;
}
.ui-checkbox input, .ui-radio input {
    width: 16px;
    height: 16px;
}
.ui-bar-a, .ui-page-theme-a .ui-bar-inherit, html .ui-bar-a .ui-bar-inherit, html .ui-body-a .ui-bar-inherit, html body .ui-group-theme-a .ui-bar-inherit {
    background:url(mobile/head.jpg) no-repeat;
    background-size:100% 100%;
}
</style>
<title>正泰电力服务</title>  
<script type="text/javascript"> 
var opt_data = {  
     preset: 'date', //日期格式 date（日期）|datetime（日期加时间）
     theme: 'jqm', //皮肤样式
     display: 'modal', //显示方式
     mode: 'clickpick', //日期选择模式
     dateFormat: 'yy-mm-dd', // 日期格式
     setText: '确定', //确认按钮名称
     cancelText: '取消',//取消按钮名籍我
     dateOrder: 'yymmdd', //面板中日期排列格式
     dayText: '日', monthText: '月', yearText: '年', //面板中年月日文字
     yearText: '年', monthText: '月',  dayText: '日',  //面板中年月日文字
     endYear:2050, //结束年份
     showNow:true,
     nowText:'今天',
     hourText:'小时',
     minuteText:'分'
};

// 使用定义插件
    $(document).on("pageinit", "#pageone", function(){
    $("#project_start_time").mobiscroll(opt_data);
});
//显示加载器  
function showLoader() {  
    //显示加载器.for jQuery Mobile 1.2.0  
    $.mobile.loading('show', {  
        text: '请稍后...', //加载器中显示的文字  
        textVisible: true, //是否显示文字  
        theme: 'b',        //加载器主题样式a-e  
        textonly: false,   //是否只显示文字  
        html: ""           //要显示的html内容，如图片等  
    });  
}  
  
//隐藏加载器.for jQuery Mobile 1.2.0  
function hideLoader()  
{  
    //隐藏加载器  
    $.mobile.loading('hide');  
} 
</script>	
<style>
#head_url_id img{
	border-radius:15px;
	height:30px;
	vertical-align: middle;
}
.ui-checkbox {
	padding-left:24px;
}
</style>
<style>
.invalid:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
     color: red;
     opacity: 1;
}
.invalid::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: red;
    opacity: 1;
}
input.invalid:-ms-input-placeholder{
    color: red;
}
input.invalid::-webkit-input-placeholder {
    color: red;
}
</style>	
</head>
<body>
	<div data-role="page" id="pageone"  >
		<div data-role="header">
			<table style="width: 100%">
	        	<tr>
				   <td style="width: 33%;padding-bottom: 35px;"></td>
				   <td style="width: 33%;text-align: center;color: white;"></td>
				   <td style="width: 33%;text-align:right;">
					   <span id="head_url_id" style="line-height:60px;"></span>
		    		  <!--  <span id="niceName" style="line-height:60px;color:#fff;font-weight: 200;"></span> -->
		    	   </td>
		    	   <td></td>
				</tr>
		    </table>
		</div>
		<!-- <div class="sigma-content" style="background-color: #befdf3;">
		    <div class="sigma-middle-line">
		        <span class="sigma-line-text">信息详情录入</span>
		    </div>
		</div> -->
		<div data-role="main" class="ui-content" data-theme="b" > 
			<table style="width: 100%">
			   <tr>
				  <td ><label for="customer_type_product">客户需求产品<span class="red">*</span></label></td>
				  <td>
					<select name="customer_type_product" id="customer_type_product" data-inline="true" >
						<option value="-1">请选择</option>
						<option value="电力运维服务">电力运维服务</option>
						<option value="能效管理服务" >能效管理服务 </option>
					</select> 
				  </td>
				</tr>
				<tr>
					<td  style="width: 35%"><label for="provider_phone_number">您的手机号<span class="red">*</span></label></td>
					<td style="padding-right: 5%"><input type="number" name="provider_phone_number" id="provider_phone_number"  
					placeholder="请输入真实手机号" required="required"></td>
				</tr>
				<tr>
					<td ><label for="provider_name">您的姓名</label></td>
					<td style="width: 55%;padding-right: 5%"><input type="text" name="provider_name" id="provider_name" placeholder="请输入姓名" required="required"></td>
				</tr>
				<tr style="height: 2px">
					<td colspan="2">
						<div style="border-top: 1px dotted;height: 1px"></div>
					</td>
				 </tr>
				 <tr>
					<td ><label for="project_name">项目名称<span class="red">*</span></label></td>
					<td style="padding-right: 5%"><input type="text" name="project_name" id="project_name" placeholder="请输入完整的项目名称" required="required"></td>
				 </tr>
				<tr>
				<tr >
					<td>
					 <span style="font-weight: 800;font-size: 16px;color: #737373;">项目所在省：<span class="red">*</span></span>
					</td>
					<td>
					   <select name="provid" id="selectProvince" data-inline="true">
							 <option value="-1">请选择</option> 
						</select>
					</td>
				</tr>
				<tr>
					<td>
					    <span style="font-weight: 800;font-size: 16px;color: #737373;">项目所在市：<span class="red">*</span></span>
					</td>
					<td>
						<select name="cityid" id="selectCity" data-inline="true">
						<option value="-1">请选择</option> 
					  </select>
					</td>
				</tr>
				
				<tr>
				<tr>
					<td ><label for="project_start_time">项目启动时间<span class="red">*</span></label></td>
					<td style="padding-right: 5%">
						<input type="text" name="project_start_time" data-role="datebox" id="project_start_time" placeholder="2019-01-01" required="required">
					</td>
				</tr>
				<tr>
					<td ><label for="scale">项目预估规模<span class="red">*</span></label></td>
					<td >
						<select name="scale" id="scale" data-inline="true" >
						    <option value="-1">请选择</option>
							<option value="<500万"><500万</option>
							<option value="500万-1500万">500万-1500万</option>
							<option value="1500万-5000万">1500万-5000万</option>
							<option value=">5000万">>5000万</option>
						</select> 
					</td>
				</tr>
				<tr style="height: 2px">
					<td colspan="2" >
							<div style="border-top: 1px dotted;height: 1px"></div>
					</td>
				</tr>
				<tr>
					<td ><label for="customer_type">所属行业<span class="red">*</span></label></td>
					<td >
						<select name="customer_type" id="customer_type" data-inline="true">
						    <option value="-1">请选择</option>
							<option value="电网行业">电网行业</option>
							<option value="石油石化  " > 石油石化 </option>
							<option value="矿业冶金  " > 矿业冶金 </option>
							<option value="建筑行业  " > 建筑行业</option>
							<option value="信息通信  " > 信息通信</option>
							<option value="公用市政 " > 公用市政</option>
							<option value="风光水核电 " > 风光水核电</option>
							<option value="轨道与交通 " > 轨道与交通</option>
							<option value="其他    " > 其他 </option>
						</select> 
					</td>
				</tr>
				<tr>
				    <td ><label for="info">项目信息简述</label></td>
					<td style="padding-right: 5%">
						<textarea name="project_description" id="info" placeholder="简述项目信息及客户需求要点" required="required"></textarea> 
					</td>
				</tr>
				<tr>
					<td colspan="2">
						   <label>为核实项目真实性，请提供以下一项信息<span class="red">*</span></label>
						</td>
				</tr>
				
				<table>
				         <tr>
					        <td >
					             <select name="truth_type" id="truth_type" data-inline="true" onchange="due_to_truth();">
					                <option value="-1">请选择</option>
									<option value="0">项目招标信息</option>
									<option value="1" > 项目立项信息</option>
									<option value="2" > 甲方负责人及电话</option>
									<option value="3" > 其他证明方法</option>
								</select> 
					        </td>
						    <td style="padding-right: 5%">
								<form id="form2" action="" method="post" enctype="multipart/form-data">
									
								</form>
								<input id="file_url" name="file_url" type="hidden"/> 
								
								<span id="file_url1_id"></span>
							</td>
						</tr>
				 </table>
					
				<table>
					<tr>
						<td >
							<input type="checkbox" name="communic" id="communic">
						</td>
						<td style="width: 85%;padding-right: 5%;padding-top: 4px;">&nbsp; <lable>尽快与我取得联系</lable></td>
					</tr>
					<tr>
						<td >
							<input type="checkbox" name="channel" id="channel">
						</td>
						<td style="width: 90%;padding-right: 5%;padding-top: 4px;"> &nbsp; <lable>我想成为（推荐）渠道商</lable></td>
					</tr>
				</table>
			</table>
			<input type="hidden" id="openid" name="openid" value="" >         <!-- 当前授权用户 -->
			<input type="hidden" id="zf_openid" name="zf_openid" value="" >   <!-- 生成二维码转发的授权用户 -->
			
			<input type="submit"  value="提交" onclick="all_submit();"  >
			
			<input type="submit"  value="生成转发二维码" onclick="qrcode();"  >
		</div>	
				
			
		
 		<div  style="background-color:#2f3c48;color:#fff;text-align: center;height: 50px; float: left;width: 100%;background:url(mobile/floot.jpg) no-repeat; background-size:100% 100%;">
			<!-- <h3 >©正泰电力服务</h3> -->
		</div> 
	</div>
 
  
    
</body>
<script type="text/javascript">
function due_to_truth(){
	var truth_type = $("#truth_type").val();
	if(truth_type=="2"){
	     $("#form2").html('');
	 	 $("#file_url1_id").html('<div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"><input type="text" name="file_url1" id="file_url1" placeholder="输入姓名和电话" ></input><div>');
	}else {
	     $("#form2").html('<input id="fileup" name="file22" type="file" onchange="uploadFile()" /> ');
	     $("#file_url1_id").html('');
	}
};
</script>
<script type="text/javascript">
    // 填充省下拉列表  
    var provincesOptionHtml = "";  
    var provinces = [];  
    for(var el in provinceAndCityArray) {  
        provinces.push(provinceAndCityArray[el].name);  
        provincesOptionHtml += "<option value=" + el + ">" + provinceAndCityArray[el].name + "</option>";  
    }  
    $("#selectProvince").append(provincesOptionHtml);
    var selectedProvince = $("#selectProvince :selected").val();  
        if(selectedProvince != -1) {  
            var citiesOptionHtml = "";  
            var cities = [];  
            cities = provinceAndCityArray[selectedProvince].cities;  
            for(var elCity in cities) {  
                citiesOptionHtml += "<option value=" + elCity + ">" + cities[elCity] + "</option>";  
            }  
            // 清空之前的城市列表  
            $("#selectCity option[value!=-1]").remove();  
            $("#selectCity option[value=-1]").attr("selected", true);  
            $("#selectCity").append(citiesOptionHtml);  
        }  
    // 填充城市下拉列表  
    $("#selectProvince").bind("change", function() {  
        var selectedProvince = $("#selectProvince :selected").val();  
        if(selectedProvince != -1) {  
            var citiesOptionHtml = "";  
            var cities = [];  
            cities = provinceAndCityArray[selectedProvince].cities;  
            for(var elCity in cities) {  
                citiesOptionHtml += "<option value=" + elCity + ">" + cities[elCity] + "</option>";  
            }  
            // 清空之前的城市列表  
            $("#selectCity option[value!=-1]").remove();  
            $("#selectCity option[value=-1]").attr("selected", true);  
            $("#selectCity").append(citiesOptionHtml);  
            $("#selectCity").selectmenu("refresh");  
        }  
    });  
</script>
<script type="text/javascript">
	function uploadFile(){
	 showLoader();
	 var options = {  
	      // 规定把请求发送到那个URL  
	      url: "rest/uploadFile",  
	      // 请求方式  
	      type: "post",  
	      // 服务器响应的数据类型  
	      dataType: "json",  
	      // 请求成功时执行的回调函数  
	      success: function(data, status, xhr) {  
	      		$("#file_url").val(data.fileUrl);
	      		hideLoader();
	          	alert("上传文件成功！")
	    	}
	    }
	    $("#form2").ajaxSubmit(options);  
	
	};
	$(function(){
	      var zf_openid = getUrlParam("zf_openid");/**加载获取转发用户的openid**/
	      //alert(zf_openid);
	      $("#zf_openid").val(zf_openid);
    });
    function getUrlParam(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
		var r = window.location.search.substr(1).match(reg);
		if (r != null) return unescape(r[2]);
		return null;
	};
</script>
</html>
